#include <iostream>
#include <vector>
using namespace std;

int n;
int main()
{
    cin >> n;
    vector<int> arr(n, 0);
    for (auto &ch : arr)
    {
        cin >> ch;
    };
    for (int i = 0; i < n - 1; i++)
    {
        int falg = 1;
        for (int j = 0; j < n - 1 - i; j++)
        {
            if (arr[j] > arr[j + 1])
            {
                falg = 0;
                swap(arr[j], arr[j + 1]);
            }
        }
        if (falg == 1)
        {
            break;
        }
    }
    for (auto &ch : arr)
    {
        cout << ch << " ";
    };
    return 0;
}